package com.gsdse.service;

import com.gsdse.pojo.ReturnData;
import com.gsdse.pojo.apply;

import java.util.List;

public interface ApplyService  {

    boolean insertApply(apply apply);

    apply selectApplybyUserid(Integer userId);

     boolean updateApply(apply apply);

    //查找
    apply selectApplyByApplyId (Integer applyId);


    List<apply> selectApplyByWilling(String department);

    Integer selectCountByFirstWilling(String department, String startTime, String endTime);

    //查找两个志愿都通过的
    List<apply> selectApplyBytwoWilling();

    apply selectApplyBytimestamp(long timestamp);

    Boolean SetUserId (String userId,String applyId);

    Boolean reverseWilling(int applyId, String firstStatus, String secondStatus);

    List<apply> selectApplyByWillingAndTime(String departmentId, String startTime, String endTime);

    void addApply2QueueAndText(Integer applyId) throws InterruptedException;

    void addApply2QueueAndPic(String userId) throws InterruptedException;

    ReturnData getApplyTime();

    ReturnData setApplyTime(String startTime, String endTime);

    void addStatus2QueueToSend(String applyId, int i) throws InterruptedException;
}
